#include <stdio.h>
#include <sys/uio.h>



/*
struct iovec {
    void *iov_base;
    size_t iov_len;
};
*/

int main( int argc, char *argv[])
{
    struct iovec vec[2];

    char buf1[] = "ABCDEFG";
    char buf2[] = "1234567";
    int str_len;

    vec[0].iov_base = buf1;
    vec[0].iov_len  = 3;
    vec[1].iov_base = buf2;
    vec[1].iov_len  = 4;

    str_len = writev( 1, vec, 2);
    puts("");
    printf("write bytes len: %d\n", str_len);



    return 0;
}